Skip to content

feat(outbound): add token/api-key upload and connection-status list methods#754

Merged
dorsha merged 2 commits into
mainfrom
feat/outbound-app-token-management
Jun 28, 2026
Merged

feat(outbound): add token/api-key upload and connection-status list methods#754
dorsha merged 2 commits into
mainfrom
feat/outbound-app-token-management

Conversation

@dorsha

@dorsha dorsha commented Jun 27, 2026

Copy link
Copy Markdown
Member

Related Issues

Fixes descope/etc#16568
Fixes descope/etc#16569

(Upstream SDK issues: #748, #749)

Description

The outbound-application management REST API already ships these endpoints, but the Node SDK didn't wrap them. This adds them to management.outboundApplication:

Upload / migrate credentials (#748 / descope/etc#16568)

  • uploadUserApiKey(appId, userId, apiKey, tenantId?) / uploadTenantApiKey(appId, tenantId, apiKey) — store a static API key on an apikey-type app
  • uploadUserToken(token) / uploadTenantToken(token) — migrate an existing OAuth token without re-running the flow
  • batchUploadUserTokens(tokens) / batchUploadTenantTokens(tokens) — all-or-nothing batch (returns per-item failures)

Connection-status read (#749 / descope/etc#16569)

  • listAppsWithUserToken(userId, tenantId?) — the app IDs a user holds a valid token for; replaces calling fetchToken once per app and sniffing the E111504 not-found code

Request payloads were verified field-for-field against the backend proto messages (API-key field is apiKey; verifyRefresh is single-upload only).

Must

  • Tests — added cases for every new method (outboundapplication.test.ts)
  • Documentation — README "Manage Outbound Applications" section updated

🤖 Generated with Claude Code

…ethods

Wrap the outbound-application management REST endpoints that the SDK didn't expose,
on management.outboundApplication:

- uploadUserApiKey / uploadTenantApiKey (apikey-type apps)
- uploadUserToken / uploadTenantToken + batchUpload{User,Tenant}Tokens (oauth-type migration)
- listAppsWithUserToken (connection-status read, replaces N fetchToken calls)

Closes descope/etc#16568
Closes descope/etc#16569

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@shuni-bot-dev

shuni-bot-dev Bot commented Jun 27, 2026

Copy link
Copy Markdown

🐕 Review complete — View session on Shuni Portal 🐾

@shuni-bot-dev

shuni-bot-dev Bot commented Jun 27, 2026

Copy link
Copy Markdown

🐕 Suggested Reviewers

The review assignment prioritizes recent contributors to the affected files, covering different parts of the update such as core logic, testing, and path management, to ensure comprehensive review coverage.

Reviewer Reason
aviadl Recent contributor with multiple commits across key files such as outboundapplication.ts and outboundapplication.test.ts, indicating deep familiarity with the core implementation.
talaharoni Multiple recent commits covering the same set of files, suggesting recent engagement and understanding of the API and its testing.
orius123 Contributed to several files related to the outbound application, including the test and main implementation files, making them well-suited to review the broader changes.
itaihanski Has contributed to the main outboundapplication.ts and its tests, ensuring familiarity with the function implementations and tests.
ckiee Added commits to paths.ts, which covers URL path management, relevant for endpoint additions and routing logic in the SDK.

Suggested by Shuni based on git history and PR context. Names are not @-mentioned to avoid notifying anyone — request a review from whoever fits best.

@shuni-bot-dev shuni-bot-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐕 Shuni's Review

Wraps the existing outbound-application management REST endpoints (token/api-key upload, batch migrate, connection-status list) as new management.outboundApplication SDK methods.

No issues found — good bones! New methods mirror the existing transformResponse/apiPaths patterns exactly, tests assert the correct path + payload for each, and the new types are consistent. Woof!

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dorsha dorsha requested review from aviadl and talaharoni June 27, 2026 07:51
@dorsha dorsha enabled auto-merge (squash) June 27, 2026 07:59
@dorsha dorsha merged commit dad7907 into main Jun 28, 2026
28 checks passed
@dorsha dorsha deleted the feat/outbound-app-token-management branch June 28, 2026 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants